package com.disease.chronic;

import com.disease.chronic.Component.AiWebSocket;
import com.disease.chronic.Component.AlertWebSocket;
import com.disease.chronic.Component.DeviceStatusWebSocket;
import org.mybatis.spring.annotation.MapperScan;
import org.springframework.boot.SpringApplication;
import org.springframework.boot.autoconfigure.SpringBootApplication;
import org.springframework.context.ConfigurableApplicationContext;
import org.springframework.scheduling.annotation.EnableAsync;

@SpringBootApplication
@MapperScan(basePackages = "com.disease.chronic.Mappers")
@EnableAsync
public class ChronicApplication {

    public static void main(String[] args) {
        ConfigurableApplicationContext applicationContext = SpringApplication.run(ChronicApplication.class, args);
        AlertWebSocket.setApplicationContext(applicationContext);

        DeviceStatusWebSocket.setApplicationContext(applicationContext);
        AiWebSocket.setApplicationContext(applicationContext);

    }

}
